#include <QMessageBox>

#include "toolsmanager.h"
#include "painttool.h"

ToolsManager* ToolsManager::_instance = NULL;

ToolsManager* ToolsManager::instance()
{
    if(_instance==NULL)
    {
        _instance = new ToolsManager();
    }

    return _instance;
}

ToolsManager::ToolsManager()
{
    toolsList = new QList<PaintTool>();
    initTools();
}

ToolsManager::~ToolsManager()
{
    QList<PaintTool>::iterator it;
    it = toolsList->begin();
    delete toolsList;
}

int ToolsManager::initTools()
{
    //toolsList->append();
}

void ToolsManager::toolSelect(PaintTool *currentTool)
{
    this->currentTool = currentTool;
}

PaintTool* ToolsManager::selectedTool()
{
    return currentTool;
}
